home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
COMAL
/
B-Book Series
/
(k)b2.d64
/
addrpgr
< prev
next >
Wrap
Text File
|
2007-02-28
|
1KB
|
66 lines
0010 DIM NAME$ OF 30
0020 DIM ADDR$(2) OF 30
0030 DIM ANSW$ OF 10
0040 //
0050 PRINT CHR$(147) //CLEAR
0060 SCREEN(8,0)
0070 PRINT "1=ENTER ADDRESSES"
0080 PRINT "2=PRINT ADDRESSES"
0090 PRINT "3=STOP"
0100 PRINT
0110 INPUT "> ": JOB
0120 IF JOB=1 THEN ENTERADDR
0130 IF JOB=2 THEN PRINTADDR
0140 END
0150 //
0160 PROC ENTERADDR
0170 MORE:=TRUE
0180 OPEN FILE 3,"@0:ADDRESSES",WRITE
0190 WHILE MORE DO TAKEIN
0200 CLOSE
0210 ENDPROC ENTERADDR
0220 //
0230 PROC TAKEIN
0240 PRINT CHR$(147) //CLEAR
0250 SCREEN(8,0)
0260 PRINT "NAME :"
0270 PRINT " -------------------------"
0280 PRINT "ADDRESS :"
0290 PRINT " -------------------------"
0300 PRINT " :"
0310 PRINT " -------------------------"
0320 SCREEN(8,11)
0330 INPUT "": NAME$
0340 MORE:=(NAME$<>"")
0350 IF MORE THEN
0360 FOR J:=1 TO 2 DO
0370 SCREEN(8+2*J,11)
0380 INPUT "": ADDR$(J)
0390 ENDFOR J
0400 WRITE FILE 3: NAME$,ADDR$(1),ADDR$(2)
0410 ENDIF
0420 ENDPROC TAKEIN
0430 //
0440 PROC PRINTADDR
0450 OPEN FILE 2,"ADDRESSES",READ
0460 REPEAT
0470 READ FILE 2: NAME$,ADDR$(1),ADDR$(2)
0480 PRINT CHR$(147)
0490 SCREEN(8,0)
0500 PRINT NAME$
0510 PRINT ADDR$(1)
0520 PRINT ADDR$(2)
0530 SCREEN(15,0)
0540 INPUT "PRESS RETURN ": ANSW$
0550 UNTIL EOF(2)
0560 CLOSE
0570 PRINT CHR$(147) //CLEAR
0580 ENDPROC PRINTADDR
0590 //
0600 PROC SCREEN(L,C)
0610 PRINT CHR$(19), //HOME
0620 FOR I:=1 TO L DO PRINT CHR$(17),
0630 FOR I:=1 TO C DO PRINT CHR$(29),
0640 ENDPROC SCREEN
0650 //